
public class Six {
    public static void main (String[] args) {
        int[][] image = {{1 ,2 ,3 ,4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
        int[][] result = rotate90(image);
        print(result);
    }

    private static void print (int[][] image) {
        int len = image.length;
        for (int i = 0; i < len; i++) {
            for (int j = 0; j < len; j++) {
               System.out.print(image[i][j] + "\t\t");
            }
            System.out.println();
        }
    }

    private static int[][] rotate90 (int[][] image) {
        int len = image.length;
        int[][] img = new int[len][len];
        for (int i = 0; i < len; ++i) {
            for (int j = 0; j < len; ++j) {
                img[j][len-1-i] = image[i][j];
            }
        }
        return img;
    }

    private static int[][] rotate90_2 (int[][] image) {
        int len = image.length;
        if (len <= 1)
            return image;

        
    }
}
